<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>采购订单信息编辑</title>
</head>
<link rel="stylesheet" type="text/css" href="/wms/js/plugins/jquery-easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="/wms/js/plugins/jquery-easyui/themes/icon.css">
<script type="text/javascript" src="/wms/js/plugins/jquery-easyui/jquery.min.js"></script>
<script type="text/javascript" src="/wms/js/plugins/jquery-easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/wms/js/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="/wms/js/common/common.js"></script>
<script type="text/javascript">
$(function() {
	$(":input[name='orderBill.sn']").textbox({});
	$(":input[name='orderBill.supplier.name']").textbox({});
	$(":input[name='orderBill.vdate']").textbox({});
	
	$(":input").prop("readonly", true);
		
});
</script>
<body>
	<form id="editForm" method="POST"
		action="/wms/orderBill_saveOrUpdate.action">
		<s:hidden name="orderBill.id" />
		<table style="table-layout: fixed;">
			<tr>
				<td>订单编号</td>
				<td><s:textfield name="orderBill.sn" /></td>
			</tr>
			<tr>
				<td width="70px">供应商</td>
				<td><s:textfield name="orderBill.supplier.name" /></td>
			</tr>
			<tr>
				<td>业务时间</td>
				<td>
					<s:date name="orderBill.vdate" format="yyyy-MM-dd" var="vd"/>
					<s:textfield name="orderBill.vdate" value="%{vd}"/>
				</td>
			</tr>
			<tr>
				<td>明细</td>
			</tr>
			<tr>
				<td></td>
				<td>
					<table border=1 cellspacing="0">
						<thead>
							<tr>
								<th>货品</th>
								<th>品牌</th>
								<th>价格</th>
								<th>数量</th>
								<th>小计</th>
								<th>备注</th>
							</tr>
						</thead>
						<tbody id="items_table_body">
							 <!-- 编辑  -->
								<s:iterator value="orderBill.items">
								 	<tr>
										<td><input type="text" value="<s:property value='product.name'/>" tag="name" /><a class="easyui-linkbutton btn_selectProduct" data-options="text:'选择',iconCls:'icon-search',plain:true"></a>
											<s:hidden name="product.id" tag="pid" />
										</td>
										<td><span tag="brandName"><s:property value="product.brand.name"/></span></td>
										<td><input type="text" value="<s:property value='costPrice'/>" tag="costPrice" /></td>
										<td><input type="text" value="<s:property value='number'/>" tag="number" /></td>
										<td><span tag="amount"><s:property value="amount"/></span></td>
										<td><input type="text" value="<s:property value='remark'/>" tag="remark" /></td>
									</tr>
								</s:iterator>
						</tbody>
					</table>
				</td>
			</tr>
			<tr>
				<td></td>
				<td>
					<a class="easyui-linkbutton" data-options="text:'返回列表',iconCls:'icon-cancel',onClick:cancel"></a>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>
